"""
PARTIAL_LINK_TEXT只定位可点击得链接
"""

import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://baidu.com")
# driver.find_element(By.PARTIAL_LINK_TEXT,"新闻").click()
driver.find_elements(By.PARTIAL_LINK_TEXT, "新闻")[0].click()

time.sleep(3)
driver.close()
